package com.plwf.lake.controller;

import com.plwf.lake.entity.Reverse;
import com.plwf.lake.service.ReverseService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
/**
 * 保存预约信息接口
 * @author ：plwf
 * @time：2019-5-12
 */
@RestController
@RequestMapping("/reverse")
public class ReverseCtrl {
    @Resource
    private ReverseService service;
    @RequestMapping("/save")
    public Reverse save(Reverse bean){
        if(service.save(bean)){
            return bean;
        }else{
            return null;
        }

    }
    @RequestMapping("/saveComm")
    public boolean saveComm(Reverse bean){

        if(service.saveComm(bean)){
            return true;
        }else{
            return false;
        }

    }

    @RequestMapping("/remove")
    public boolean remove(Reverse bean){
        return this.service.remove(bean);

    }
    @RequestMapping("/removeComm/{id}")
    public boolean removeComm(@PathVariable("id") Integer id){
        return this.service.removeComm(id);

    }

}

